<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // console.log(Math.pow(2, 3)); // 2*2*2  n的m次方
        // console.log(Math.floor(3.14));//向下取整  3
        // console.log(Math.ceil(3.14));//向上取整   4
        // console.log(Math.round(3.4));//四舍五入
        // console.log(Math.round(3.5));
        // console.log(Math.abs(-1));//取绝对值   1
        // console.log(Math.max(10, 3, 4, 5, 66, 7));//取最大值  66
        // console.log(Math.min(10, 3, 4, 5, 66, 7));//取最小值  3
        console.log('--------------------------------------------');
        //随机数
        console.log(Math.round(Math.random() * 100)); //[0,1)之间的随机小数  0<= n < 1

        //30-50   Math.round(Math.random() * (max-min)) + min
        console.log(Math.round(Math.random() * 30) + 70);</script>
</body>

</html>